import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/dist/vite'
import Components from 'unplugin-vue-components/dist/vite'
import {ElementPlusResolver} from 'unplugin-vue-components/dist/resolvers'
import ElementPlus from 'unplugin-element-plus/dist/vite'
import Icons from 'unplugin-icons/dist/vite'
import IconsResolver from 'unplugin-icons/dist/resolver'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        ElementPlus(),
        AutoImport({
            imports: ["vue", "vue-router"],
            resolvers: [
                IconsResolver(),
                ElementPlusResolver()
            ]
        }),
        Components({
            resolvers: [
                IconsResolver(),
                ElementPlusResolver()
            ]
        }),
        Icons({
            autoInstall: true,
            compiler: 'vue3'
        })
    ],
})
